package com.wl.api.model.business;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 *
 * 
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "customer_order")
public class CustomerOrder implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/** 自动编号 */
	@TableId(value = "order_id", type = IdType.AUTO)
	private Long orderId;

	/** 订单编号 */
	@TableField(value = "order_no")
	private String orderNo;

	/** 物流单号 */
	@TableField(value = "service_no")
	private String serviceNo;

	/** 渠道编号 */
	@TableField(value = "channel_id")
	private Long channelId;

	/** 渠道名称 */
	@TableField(value = "channel_name")
	private String channelName;

	@TableField(value = "cust_id")
	private Long custId;
	
	/** 发件地 */
	@TableField(value = "from_id")
	private Integer fromId;

	/** 收件地 */
	@TableField(value = "reach_id")
	private Integer reachId;

	/** 货物长度 */
	@TableField(value = "package_length")
	private BigDecimal packageLength;

	/** 货物宽度 */
	@TableField(value = "package_heigth")
	private BigDecimal packageHeigth;

	/** 货物高度 */
	@TableField(value = "package_width")
	private BigDecimal packageWidth;

	/** 重量KG */
	private BigDecimal weight;

	/** 订单状态 */
	private Integer state;

	/** 是否支付 */
	private Integer ispay;

	/** 付款时间 */
	private Date paytime;

	/** 应收总费用=揽收费+境内物流费用+境内物流费用+境外物流费用+派送费 */
	private BigDecimal amount;

	/** 揽收费 */
	@TableField(value = "lan_fee")
	private BigDecimal lanFee;

	/** 境内物流费用 */
	@TableField(value = "local_shopping_fee")
	private BigDecimal localShoppingFee;

	/** 派送费 */
	@TableField(value = "delivery_fee")
	private BigDecimal deliveryFee;

	/**国际物流费用 */
	@TableField(value = "foreign_shopping_fee")
	private BigDecimal foreignShoppingFee;
/*
	*//** 国内物流应付金额，也就是标准价，差价是利润 *//*
	@TableField(value = "local_stand_sf")
	private BigDecimal localStandSf;

	*//** 国内物流应付金额，也就是标准价，差价是利润 *//*
	@TableField(value = "foreign_stand_sf")
	private BigDecimal foreignStandSf;*/
	
	@TableField(value = "update_user_id")
	private Long updateUserId;
	
	@TableField(value = "update_user")
	private String updateUser;
	
	@TableField(value = "pay_amt")
	private BigDecimal payAmt;
	
	private String remark;
	
	public CustomerOrder buildState(Integer state) {
		this.state = state;
		return this;
	}
	
	public CustomerOrder buildOrderId(Long orderId) {
		this.orderId = orderId;
		return this;
	}

	public CustomerOrder buildOrderNo(String orderNo) {
		this.orderNo = orderNo;
		return this;
	}
}
